<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/pc_master">
<div layout:fragment="content" class="section page-content">
    <link rel="stylesheet" href="/pc/css/center/auth/index.css">
    <input type="hidden" value="identity" id="filedir">

    <!-- s: 导航 -->
    <div class="breadcrumb-wrap">
        <div class="layui-main clearfix">
            <div class="breadcrumb">
                <a href="/">首页</a> - <a href="/center">用户中心</a> - 诚信认证
            </div>
        </div>
    </div>
    <!-- e: 导航 -->
    <div class="section page-content">
        <div class="layui-main clearfix">
         <div th:include="layout/center_left :: center_left" class="manage-aside"></div>

            <div class="manage-main">
            <div th:include="layout/center_auth :: auth"></div>

            <div class="main-content">
                <div class="content headstatus" th:if="${auth.identityCheck eq 3}">
                    <div style="text-align: center; padding:80px 40px">
                        <div>
                            <img class="imgshow previews car_pic-previews" src="/pc/img/auth/headstatus.svg">
                        </div>
                        <div style="font-size:26px;color: #F3BB1E">
                            等待审核中
                        </div>
                        <div style="font-size: 14px; color: #999;">你提交的资料等待审核中,如需修改请联系客服～</div>
                    </div>
                </div>
                <div class="formcontent" th:if="${auth.identityCheck ne 3}">
                    <form bottlecms-form-ajax="" method="post" onsubmit="return check()" id="thisform">
                        <input type="hidden" name="_method" value="PUT">
                        <div class="content">
                            <div class="bcui-form ">

                                <div class="form-item">
                                    <input bottlecms-input="" type="text" name="name" id="name" th:value="${auth.name}" placeholder="请输入真实姓名">
                                </div>
                                <div class="form-item">
                                    <input bottlecms-input type="text" name="idCardNo" id="idCardNo"
                                           th:value="${auth.idCardNo}" placeholder="请输入身份证号" size="18"/>
                                </div>
                                <div class="upfilebox">
                                    <div class="upbtn filebox">
                                        <img class="imgshow previews face_photo-previews"
                                             th:src="${auth.facePhoto}+'_200x200.jpg'"/>

                                        <input type="hidden" name="facePhoto" id="facePhoto"
                                               th:value="${auth.facePhoto}"/>
                                        <input type="file" accept="image/*" data-previews=".face_photo-previews"/>

                                        <i class="btnicon icon-bottlecms-20"></i>
                                    </div>
                                    <div class="tit">添加正面人脸照</div>
                                </div>

                                <div class="upfilebox">
                                    <div class="upbtn filebox">
                                        <img class="imgshow previews id_card_positive_photo-previews"
                                             th:src="${auth.idCardPositivePhoto}"/>

                                        <input type="hidden" name="idCardPositivePhoto" id="idCardPositivePhoto"
                                               th:value="${auth.idCardPositivePhoto}"/>
                                        <input type="file" accept="image/*"
                                               data-previews=".id_card_positive_photo-previews"/>

                                        <i class="btnicon icon-bottlecms-20"></i>
                                    </div>
                                    <div class="tit">添加身份证人像面</div>
                                </div>

                                <div class="upfilebox">
                                    <div class="upbtn filebox">
                                        <img class="imgshow previews id_card_back_photo-previews"
                                             th:src="${auth.idCardBackPhoto}"/>

                                        <input type="hidden" name="idCardBackPhoto" id="idCardBackPhoto"
                                               th:value="${auth.idCardBackPhoto}"/>
                                        <input type="file" accept="image/*"
                                               data-previews=".id_card_back_photo-previews"/>

                                        <i class="btnicon icon-bottlecms-20"></i>
                                    </div>
                                    <div class="tit">添加身份证国徽面</div>
                                </div>

                            </div>
                        </div>

                        <div class="btnbox">
                            <button class="btn  submit" type="submit">
                                确认提交
                            </button>
                        </div>
                        <div style="height:80px;"></div>
                    </form>
                </div>




            </div>
            </div>

        </div>
    </div>

</div>
<div layout:fragment="contentFooter">

    <script type="text/javascript" src="/pc/js/center/auth/auth.js"></script>
    <script type="text/javascript">
        function check() {
            var name = $("#name").val().trim();
            var idCardNo = $("#idCardNo").val().trim();
            if (name.length == 0) {
                bottlecms.toast("请输入真实姓名");
                return false;
            }
            if (idCardNo.length != 18) {
                bottlecms.toast("请输入身份证号");
                return false;
            }
            $("#thisform").attr("action", "/m/ajax/center/auth/identity");
            return true;
        }
    </script>
</div>
</html>